'use strict';

const {
  DataTypes,
} = require('sequelize');

module.exports = sequelize => {
  const attributes = {
    room_name: {
      type: DataTypes.STRING(255),
      allowNull: true,
      defaultValue: null,
      primaryKey: false,
      autoIncrement: false,
      comment: null,
      field: 'room_name',
    },
    uuid: {
      type: DataTypes.CHAR(36),
      allowNull: false,
      defaultValue: null,
      primaryKey: true,
      autoIncrement: false,
      comment: null,
      field: 'uuid',
    },
    created_at: {
      type: DataTypes.DATE,
      allowNull: true,
      defaultValue: null,
      primaryKey: false,
      autoIncrement: false,
      comment: null,
      field: 'created_at',
    },
    updated_at: {
      type: DataTypes.DATE,
      allowNull: true,
      defaultValue: null,
      primaryKey: false,
      autoIncrement: false,
      comment: null,
      field: 'updated_at',
    },
    room_size: {
      type: DataTypes.INTEGER,
      allowNull: true,
      defaultValue: null,
      primaryKey: false,
      autoIncrement: false,
      comment: null,
      field: 'room_size',
    },
    info: {
      type: DataTypes.STRING(128),
      allowNull: true,
      defaultValue: null,
      primaryKey: false,
      autoIncrement: false,
      comment: null,
      field: 'info',
    },
  };
  const options = {
    tableName: 'rooms',
    comment: '',
    indexes: [],
  };
  const RoomsModel = sequelize.define('rooms_model', attributes, options);
  return RoomsModel;
};
